<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title><%= "#{h @page_title} - " if @page_title %>Beast</title>
  <%= stylesheet_link_tag 'display' %>
  <%= javascript_include_tag "prototype", "effects", "lowpro", "application" %>
  <%= javascript_include_tag "jquery-1.2.3.min.js" %>
  <script type="text/javascript"> jQuery.noConflict(); var $j = jQuery; </script>
<% unless @feed_icons.blank? -%>
  <% @feed_icons.each do |feed| -%>
  <%= auto_discovery_link_tag :rss, feed[:url], :title => "Subscribe to '#{feed[:title]}'" %>
  <% end -%>
<% end -%>
  <link rel="search" type="application/opensearchdescription+xml" href="http://<%= request.host_with_port %>/open_search.xml" />
</head>
<body>

<div id="header">

  <ul id="nav">
    <li><%= link_to _('Index'), home_path, :rel => 'home' %></li>
    <li><%= link_to _('Users'), users_path %></li>
    <li id="search">
      <% form_tag search_all_posts_path, :method => 'get' do -%>
        <%= text_field_tag :q, params[:q], :size => 15, :id => :search_box %>
      <% end -%>
    </li>
    <li><%= link_to_function _('Search'), "$j('form:first').submit();", :href => home_path %></li>

    <% if logged_in? %>
    <li class="login"><%=  link_to current_user.login, user_path(current_user) %></li>
    <li class="logout"><%= link_to _('Settings'), settings_path %></li>
    <li class="logout"><%= link_to _('Logout'), logout_path %></li>
    <% else %>
    <li><%= link_to _('Signup'), signup_path %></li>
    <li><%= link_to _('Login'), login_path %></li>
    <% end %>
    
  </ul>

  <h1><%= link_to 'Ruby on Rails', home_path %></h1>
  
</div>

<div id="container">

<div id="content">
  
<%= content_tag 'p', h(flash[:notice]), :class => 'notice' if flash[:notice] %>
<%= content_tag 'p', h(flash[:error]), :class => 'notice error' if flash[:error] %>
  
<%= @content_for_layout %>
</div>

<div id="right">
  <%= @content_for_right %>
</div>

<br style="clear:both;" />

</div>

<div id="footer">
<!--
<p class="legal">
<a href="/legal/" style="color:#369;">Legal</a>
</p>
-->
<p class="disclaim">
<strong>
  <%
  footers=["Ruby on Rails 出色的开源论坛"
  ]
  %>
  <%= footers[rand(footers.size)]%>
  </strong>
</p>
<p class="credit">
  <%= _('Powered by') %> <a href="http://localhost:3000/">RoR</a><br />
  &copy; 2009 任红霞、王敏<%= _('and') %>常和
</p>
<br style="clear:both;" />
</div>
</body>
</html>
